<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商品品牌')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-brands-edit" th:object="${goodsBrands}">
            <input name="brandId" th:field="*{brandId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">商品品牌启用状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_enable_status')}">
                        <input type="radio" th:id="${'enableStatus_' + dict.dictCode}" name="enableStatus" th:value="${dict.dictValue}" th:checked="(*{enableStatus} == ${dict.dictValue})" required>
                        <label th:for="${'enableStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商品品牌名称：</label>
                <div class="col-sm-8">
                    <input name="brandName" th:field="*{brandName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商品品牌缩略图地址：</label>
                <div class="col-sm-8">
                    <input name="thumbnailUrl" th:field="*{thumbnailUrl}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商品品牌主图：</label>
                <div class="col-sm-8">
                    <input name="mainImg" th:field="*{mainImg}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商品品牌排序数字：</label>
                <div class="col-sm-8">
                    <input name="sortNum" th:field="*{sortNum}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">品牌描述：</label>
                <div class="col-sm-8">
                    <input name="brandDesc" th:field="*{brandDesc}" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "commodity/brands";
        $("#form-brands-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-brands-edit').serialize());
            }
        }
    </script>
</body>
</html>